import org.apache.log4j.Logger;
import org.junit.Test;

/**
 * @author Ajie
 * @date 2020-09-24
 * @function
 */
public class BreakDemo {
    private static final Logger logger = Logger.getLogger(BreakDemo.class);

    @Test
    public void testContain(){
        awhile:while (true){
            int count =0;
            try {
                logger.info("testContain:"+(count++));
                for (int i = 0; i < 5; i++) {
                    if (i==4){
                        continue awhile;
                    }
                    logger.info("testContain: fori "+i);
                }
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
